package com.cskaoyan.javase.oop3.innerclazz6.exercise5;

/**
 * @description: 练习1
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

public class Demo {
    public static void main(String[] args) {
        Outer.Inner inner = new Outer().new Inner(); //创建成员内部类对象
        inner.show();
    }
}
//补全程序，使得可以输出三个num  鸡刀小试
class Outer {
    public int num = 10;
    class Inner {
        public int num = 20;
        public void show() {
            int num = 30;
            System.out.println(num); //30
            System.out.println(this.num); //20 this代表当前成员内部类对象
            System.out.println(Outer.this.num); //10 //外围类的成员变量 Outer.this代表外围类对象
        }
    }
}
